package com.sky.mapper;

import com.sky.entity.OrderDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.ArrayList;
import java.util.List;

@Mapper
public interface OrderDetailMapper {

    /**
     * 批量插入订单细节数据
     * @param list
     */
    void insertBatch(List<OrderDetail> list);

    /**
     * TODO 要删除的
     * 根据订单id查询订单明细
     * @param id
     * @return
     */
    @Select("select  * from order_detail where  order_id=#{orderId}")
    List<OrderDetail> getByOrderId(Long id);
}
